<?php
		
	include	("../include/connexionBDD.php");
	if(isset($_REQUEST["login"]))
	{
		$login=$_REQUEST["login"];
		//echo $login;
	}
	if(isset($_REQUEST["mdp"]))
	{
		$mdp=$_REQUEST["mdp"];
		//echo $mdp;
	}
	
	$requete="SELECT * FROM tresoriers WHERE NUMTRESORIER='".$login."' AND PASSWORD='".$mdp."';";
	$result=mysql_query($requete);
	$nbRows=mysql_num_rows($result);
	$jsonData=array();
	//$jsonData=array();
	//Si le couple login/mdp est correct
	if($nbRows==1)
	{
		//On renvoit "true"
		//$jsonData["result"]="true";
		$jsonData[]["result"]=true;
	}
	else
	{
		//Sinon on renvoit "false"
		//$jsonData["result"]="false";
		//echo "Erreur requête : ".$requete;
		$jsonData[]["result"]=false;
	}
	print(json_encode($jsonData));
	mysql_close();
	
?>